#include "waitdialog.h"

WaitDialog::WaitDialog(QWidget *parent)
    : ADialog{parent}
{
    setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog);
    setAttribute(Qt::WA_TranslucentBackground, true);
    setFixedSize(120, 120);

    label = new ALabel(this);
    movie = new QMovie(":/img/waiting.gif", QByteArray(), this);

    label->setMovie(movie);
    label->setScaledContents(true);

    auto layout = new QVBoxLayout(this);
    layout->addWidget(label);

    movie->start();
}

WaitDialog::~WaitDialog()
{
    movie->stop();
}

